<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/4/10 0010
 * Time: 下午 1:44
 */
namespace app\common\behavior;

use think\Db;

class Appinit
{
    public function run(&$params)
    {
        // 行为逻辑
        $this->loadConfig();
    }

    /**
     * @title 读取网站
     */
    public function loadConfig()
    {
        $webconfig = db::name('system')->find(1);
        v('config',json_decode($webconfig['webconfig'],true));
        v('wechat',json_decode($webconfig['wechatconfig'],true));
    }

}